package com.mzx.demo.dao;

import com.mzx.demo.pojo.Car;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.context.annotation.Bean;

import java.util.Date;
import java.util.List;

@Mapper
public interface CarDao {

    @Select("select * from car where 1 = 1")
    List<Car> findAllCar();


    @Insert("insert into car(id,name,ctime) values (#{id},#{name},#{ctime})")
    boolean saveCar(Car car);

    @Delete("delete from car where id = #{id}")
    boolean delCar(Integer id);
}
